﻿using AutoMapper;
using SmartHotel.AccommodationSetting.Dto;
using SmartHotel.CheckIns.Dto;
using SmartHotel.House.Dto;
using SmartHotel.HouseRoom.Dto;
using SmartHotel.HousingPrice.Dto;
using SmartHotel.Menu;
using SmartHotel.Role.Dto;
using SmartHotel.RoleMenus.Dto;
using SmartHotel.Rooms.Dto;
using SmartHotel.Tag.Dto;
using SmartHotel.Users.Dto;
using SmartHotel.VIPCard.Dto;
using SmartHotel.VIPGrade;

namespace SmartHotel;

public class SmartHotelApplicationAutoMapperProfile : Profile
{
    public SmartHotelApplicationAutoMapperProfile()
    {
        /* You can configure your AutoMapper mapping configuration here.
         * Alternatively, you can split your mapping configurations
         * into multiple profile classes for a better organization. */

        //用户角色
        CreateMap<CreateandUpdateUserRole, UserRoleTable>().ReverseMap();
        CreateMap<UserRoleTable, UserRoleDto>().ReverseMap();
        //用户
        CreateMap<SmartHotel_UserTable, UserDto>().ReverseMap();
        CreateMap<CreateUpdateUser, SmartHotel_UserTable>().ReverseMap();
        //角色
        CreateMap<RoleTable, CreateandUpdateRole>().ReverseMap();
        CreateMap<RoleTable, RoleDto>().ReverseMap();
        //用户角色
        CreateMap<CreateandUpdateUserRole, UserRoleTable>().ReverseMap();
        CreateMap<UserRoleTable, UserRoleDto>().ReverseMap();
        //菜单
        CreateMap<CreateandUpdateMenu, MenuTable>().ReverseMap();
        CreateMap<MenuDto, MenuTable>().ReverseMap();
        CreateMap<MenuTreeDto, MenuTable>().ReverseMap();
        //角色菜单
        CreateMap<RoleMenu, RoleMenuDto>().ReverseMap();
        CreateMap<RoleMenu, CreateandUpdateRoleMenu > ().ReverseMap();
        //会员
        CreateMap<SmartHotel_VIPTable, GetVIPCardDto>().ReverseMap();
        CreateMap<SmartHotel_VIPTable, CreateandUpdateVIPCard>().ReverseMap();
        //等级
        CreateMap<SmartHotel_Grade, GradeListDto>().ReverseMap();
        CreateMap<SmartHotel_Grade, CreateandUpdateGradeDto>().ReverseMap();
        //房型
        CreateMap<SmartHotel_HouseTable, HouseDto>().ReverseMap();
        CreateMap<SmartHotel_HouseTable, CreateUpdateHouse>().ReverseMap();
        //标签
        CreateMap<SmartHotel_TagTable, TagListDto>().ReverseMap();
        CreateMap<SmartHotel_TagTable, CreateTagDto>().ReverseMap();
        //房号表
        CreateMap<SmartHotel_RoomNumberTable, RoomDto>().ReverseMap();
        CreateMap<SmartHotel_RoomNumberTable, CreateandUpdateRoom>().ReverseMap();

        //房号房型关系表
        CreateMap<SmartHotel_HouseRoom, HouseRoomDto>().ReverseMap();

        //房价
        CreateMap<HousingPriceTable, HousingPriceDto>().ReverseMap();
        CreateMap<HousingPriceTable, CreateandUpdateHousingPriceDto>().ReverseMap();
        //房态
        CreateMap<CreateUpdateCheckIn, SmartHotel_HouseState>().ReverseMap();
        //住宿设置
        CreateMap<AccommodationSettingTable, CrateandUpdateAccommodationSettingDto>().ReverseMap();
        CreateMap<AccommodationSettingTable, AccommodationSettingDto>().ReverseMap();
    }
}
